import { RouteRecordRaw, createRouter, createWebHistory } from 'vue-router'

const routes: Array<RouteRecordRaw> = [
    {
        path: '/login',
        component: () => import('../views/Login.vue')
    },
    {
        path: '/home',
        component: () => import('../views/Home.vue'),
        children: [
            {
                path: 'user',
                component: () => import('../views/UserList.vue')
            },
            {
                path: 'product',
                component: () => import('../views/ProductList.vue')
            },
            {
                path: 'category',
                component: () => import('../views/CategoryList.vue')
            }
        ]
    }
]
const router = createRouter({
    history: createWebHistory(),
    routes
})
export default router
